package cn.edu.ustc.xrovers.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table
public class NonFinancialInformation {

	private Integer id;
	private int year;
	private double cs;//成本结构
	private double ta;//行业成熟期
	private double ci;//行业受周期性影响程度
	private double tp;//行业盈利性
	private double pe;//法律政策环境
	private double td;//行业依赖性
	private double ps;//产品替代性
	private double es;//企业规模
	private double pv;//产品多样化
	private double dp;//企业所处发展阶段
	private double mc;//市场竞争情况
	private double ma;//管理层的经验和素质
	private double ms;//管理层稳定性
	private double fma;//财务管理能力
	private double ld;//法律纠纷
	private double icm;//内部控制与管理
	private NonFinancialInfoRatio nfir;
	private Company company;
	
	@Column(name="Non_CyclicityInfluence")
	public double getCi() {
		return ci;
	}
	@ManyToOne
	@JoinColumn(name="Company_Id")
	public Company getCompany() {
		return company;
	}
	@Column(name="Non_CostStructure")
	public double getCs() {
		return cs;
	}
	@Column(name="Non_DevelopPhase")
	public double getDp() {
		return dp;
	}
	@Column(name="Non_EnterpriseScale")
	public double getEs() {
		return es;
	}
	@Column(name="Non_FinancialManageAbility")
	public double getFma() {
		return fma;
	}
	@Column(name="Non_InternalControlManagement")
	public double getIcm() {
		return icm;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	@Column(name="Non_LegalDispute")
	public double getLd() {
		return ld;
	}
	@Column(name="Non_ManageAbility")
	public double getMa() {
		return ma;
	}
	@Column(name="Non_MarketCompetition")
	public double getMc() {
		return mc;
	}
	@Column(name="Non_ManageStability")
	public double getMs() {
		return ms;
	}
	@OneToOne(cascade=CascadeType.ALL, mappedBy="nfi")
	@PrimaryKeyJoinColumn
	public NonFinancialInfoRatio getNfir() {
		return nfir;
	}
	@Column(name="Non_PolicyEnvironment")
	public double getPe() {
		return pe;
	}
	@Column(name="Non_ProductSubstitute")
	public double getPs() {
		return ps;
	}
	@Column(name="Non_ProductVariety")
	public double getPv() {
		return pv;
	}
	@Column(name="Non_TradeAutumn")
	public double getTa() {
		return ta;
	}
	@Column(name="Non_TradeDependence")
	public double getTd() {
		return td;
	}
	@Column(name="Non_TradeProfit")
	public double getTp() {
		return tp;
	}
	@Column(name="Non_Year")
	public int getYear() {
		return year;
	}
	
	
	/*set方法*/
	public void setCi(double ci) {
		this.ci = ci;
	}
	public void setCompany(Company company) {
		this.company = company;
	}
	public void setCs(double cs) {
		this.cs = cs;
	}
	public void setDp(double dp) {
		this.dp = dp;
	}
	public void setEs(double es) {
		this.es = es;
	}
	public void setFma(double fma) {
		this.fma = fma;
	}
	public void setIcm(double icm) {
		this.icm = icm;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public void setLd(double ld) {
		this.ld = ld;
	}
	public void setMa(double ma) {
		this.ma = ma;
	}
	public void setMc(double mc) {
		this.mc = mc;
	}
	public void setMs(double ms) {
		this.ms = ms;
	}
	public void setNfir(NonFinancialInfoRatio nfir) {
		this.nfir = nfir;
	}
	public void setPe(double pe) {
		this.pe = pe;
	}
	public void setPs(double ps) {
		this.ps = ps;
	}
	public void setPv(double pv) {
		this.pv = pv;
	}
	public void setTa(double ta) {
		this.ta = ta;
	}
	public void setTd(double td) {
		this.td = td;
	}
	public void setTp(double tp) {
		this.tp = tp;
	}
	public void setYear(int year) {
		this.year = year;
	}
}
